package com.wtp.wallpaper.common.context;

import java.util.Map;

public class BaseContext {

    private static final ThreadLocal<String> threadLocal = new ThreadLocal<>();

    private static final ThreadLocal<Map<String,Object>> threadLocalMap = new ThreadLocal<>();
    public static void setCurrentId(String id) {
        threadLocal.set(id);
    }

    public static String getCurrentId() {
        return threadLocal.get();
    }

    public static void setCurrentMap(Map<String,Object> map) {
        threadLocalMap.set(map);
    }

    public static Map<String,Object> getCurrentMap() {
        return threadLocalMap.get();
    }
    public static void removeCurrentId() {
        threadLocal.remove();
    }
    public static void removeCurrentMap() {
        threadLocalMap.remove();
    }
}
